package demo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.fibo.ddp.enginex.riskengine.runner.business.DecisionApiBizData;
import com.fibo.ddp.enginex.riskengine.runner.business.DecisionApiRequest;

import java.util.HashMap;
import java.util.Map;

public class Hello {

    public static void main(String[] args){
        System.out.println("hello,runner");

        DecisionApiRequest req = new DecisionApiRequest();
        req.setTp_code("");
        req.setTimestamp(System.currentTimeMillis()+"");
        req.setSign("");
        req.setBiz_enc("0");
        DecisionApiBizData bizdata = new DecisionApiBizData();
        bizdata.setBusinessId("bizid");
        bizdata.setEngineId(1L);
        bizdata.setOrganId(2L);
        bizdata.setRuleHitRspConfig(1);
        Map<String, Object> fields = new HashMap<>();
        fields.put("key001","value001");
        bizdata.setFields(fields);
        req.setBiz_data(bizdata);


        String str = JSON.toJSONString(req, SerializerFeature.PrettyFormat);
        System.out.println(str);
    }
}
